import { CHANGEDATALIST } from './constants'

export const changDataListAction = dataList => ({ type: CHANGEDATALIST, dataList })
// 1.此处将action写成高阶函数方便与传参
export const getDataListAction = () => {
  return (dispatch, getState) => {
    console.log(getState(),1111111111111)
    setTimeout(() => {
      dispatch(changDataListAction([1, 2, 3]))
    }, 2000)
  }
}
